<div class="sales view">
<h2><?php echo __('Sale'); ?></h2>
	<dl>
		<dt><?php echo __('Sale Id'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['sale_id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Sale Code'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['sale_code']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Customer'); ?></dt>
		<dd>
			<?php echo $this->Html->link($sale['Customer']['customer_name'], array('controller' => 'customers', 'action' => 'view', $sale['Customer']['customer_id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Employee'); ?></dt>
		<dd>
			<?php echo $this->Html->link($sale['Employee']['employee_name'], array('controller' => 'employees', 'action' => 'view', $sale['Employee']['employee_id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Date Sell'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['date_sell']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Subtotal'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['subtotal']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Discount For Buyer'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['discount_for_buyer']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Total'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['total']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Sale Description'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['sale_description']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Sale'), array('action' => 'edit', $sale['Sale']['sale_id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Sale'), array('action' => 'delete', $sale['Sale']['sale_id']), array(), __('Are you sure you want to delete # %s?', $sale['Sale']['sale_id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Sales'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Sale'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Customers'), array('controller' => 'customers', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Customer'), array('controller' => 'customers', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Employees'), array('controller' => 'employees', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Employee'), array('controller' => 'employees', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Sale Details'), array('controller' => 'sale_details', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Sale Detail'), array('controller' => 'sale_details', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Sale Details'); ?></h3>
	<?php if (!empty($sale['SaleDetail'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Sale Detail Id'); ?></th>
		<th><?php echo __('Sale Id'); ?></th>
		<th><?php echo __('Mobile Model Id'); ?></th>
		<th><?php echo __('Quantity'); ?></th>
		<th><?php echo __('Price'); ?></th>
		<th><?php echo __('Discount For Item'); ?></th>
		<th><?php echo __('Retail Price'); ?></th>
		<th><?php echo __('Total'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($sale['SaleDetail'] as $saleDetail): ?>
		<tr>
			<td><?php echo $saleDetail['sale_detail_id']; ?></td>
			<td><?php echo $saleDetail['sale_id']; ?></td>
			<td><?php echo $saleDetail['mobile_model_id']; ?></td>
			<td><?php echo $saleDetail['quantity']; ?></td>
			<td><?php echo $saleDetail['price']; ?></td>
			<td><?php echo $saleDetail['discount_for_item']; ?></td>
			<td><?php echo $saleDetail['retail_price']; ?></td>
			<td><?php echo $saleDetail['total']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'sale_details', 'action' => 'view', $saleDetail['sale_detail_id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'sale_details', 'action' => 'edit', $saleDetail['sale_detail_id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'sale_details', 'action' => 'delete', $saleDetail['sale_detail_id']), array(), __('Are you sure you want to delete # %s?', $saleDetail['sale_detail_id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Sale Detail'), array('controller' => 'sale_details', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
